package com.ymttest.common.enums;

/**
 * 优惠券渠道
 */
public enum CouponChannelEnum {
	/**
	 * 未知 0
	 */
	Unkown(0),

	/**
	 * 码头自有优惠券 1
	 */
	Ymt(1),

	/**
	 * 商家优惠券 2
	 */
	Seller(2),

	/**
	 *  同时使用平台和商家优惠券 3
	 */
	BothYmtAndSeller(3);
	
	// /#endregion

	private int intValue;
	private static java.util.HashMap<Integer, CouponChannelEnum> mappings;

	private synchronized static java.util.HashMap<Integer, CouponChannelEnum> getMappings() {
		if (mappings == null) {
			mappings = new java.util.HashMap<Integer, CouponChannelEnum>();
		}
		return mappings;
	}

	private CouponChannelEnum(int value) {
		intValue = value;
		CouponChannelEnum.getMappings().put(value, this);
	}

	public int getValue() {
		return intValue;
	}

	public static CouponChannelEnum forValue(int value) {
		return getMappings().get(value);
	}
}